-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TSVB][Lens] Navigate to Lens context converting improvement. #139719
[TSVB][Lens] Navigate to Lens context converting improvement. #139719
Conversation
…hub.com:Kunzetsov/kibana into navigate-to-lens-context-converting-imporvement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yRight: Boolean(model.show_grid), | ||
}, | ||
yLeftExtent: extents.yLeftExtent, | ||
yRightExtent: extents.yRightExtent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR, but I noticed we don't convert the axis scale (setting it to log doesn't carry that over to Lens but it could). I will open an issue for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added support of it here
src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/terms.ts
Outdated
Show resolved
Hide resolved
if (series.terms_order_by === '_count' || !series.terms_order_by) { | ||
const columnId = uuid(); | ||
return { | ||
orderBy: { type: 'column', columnId }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orderBy
should be { type: 'custom' }
if you are specifying a local column, not type: 'column'
. This is causing problems when navigating over:
kibana/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/types.ts
Line 26 in 004369d
| { type: 'custom' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
// not supported formatters should be converted to number | ||
if (!isSupportedFormat(series.formatter)) { | ||
return { format: { id: DATA_FORMATTERS.NUMBER, ...(suffix && { params: { suffix } }) } }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no suffix and no formatter is specified, we should leave this empty so it can fall back to the data view formatting (right now it's forcing it to number)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we don't specify formatter (default), the series.formatter is undefined and above in code we provide empty object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's the case that should be fixed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, thank you Joe, I will update condition here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
…-ref HEAD~1..HEAD --fix'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, some comments from my side:
- cumulative sum of the value count should navigate to formula in order to work properly
- This also happens in main but I am trying to understand why it doesn't work. (we can do it on a followup PR).
While on the timeseries mode we are allowing nested combinations of aggregations (such as overall max of average) on topN we dont. Which is the reason for that? - I have this configuration
this should be allowed, it should go to Lens with pipeline agg (this works in 8.4) - Same for percentile_rank
@stratoula, I've fixed all the comments you left. Could you, please, review the PR again? Thanks 😃 |
…-ref HEAD~1..HEAD --fix'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanx @Kunzetsov! I can't find more regressions, this works fine! I tested almost all aggregations and settings. Everything works fine! LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @VladLasitsa @Kunzetsov |
Won’t get to check this again this week, dismissing my review as it has two approvals from the team already
Summary
Completes part of #138236.
counter_rate
of TSVB at Lens.Testing notes
[ link to a file with notes will be placed here ]